home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / display.doc < prev    next >
Text File  |  1986-10-29  |  3KB  |  56 lines

  1.  
  2.  
  3.         NAME
  4.                 disp_cls -- clear the display and home cursor
  5.                 disp_say -- display a string at specified position
  6.                 disp_sayr -- disp_say, returns cursor to starting point
  7.                 disp_char_at -- display character at specified position
  8.                 disp_char_atr -- disp_char_at, returns cursor to start
  9.  
  10.         SYNOPSIS
  11.                 void disp_cls();
  12.                 void disp_say(row, col, string);
  13.                 void disp_sayr(row, col, string);
  14.                 void disp_char_at(row, col, ch);
  15.                 void disp_char_atr(row, col, char);
  16.                 int row, col;     position to display
  17.                 char *string;     string to display
  18.                 char ch;          character to display
  19.  
  20.  
  21.         DESCRIPTION
  22.         These functions use the features of Datalight's display
  23.         package functions, and therefore, must follow the rules
  24.         laid down by Datalight for their use.  Specifically,
  25.         disp_open() must be called prior to using these functions,
  26.         and the functions may fail of the target system is not a
  27.         very close compatible since direct memory writing is being
  28.         used.  disp_char_at() passes only a carriage return, linefeed,
  29.         backspace, tab, and bell control code.  All other control codes
  30.         are ignored.  disp_sayr() and disp_char_atr() read the current
  31.         real cursor position and perform a disp_move() after writing
  32.         the specified data.  Before using these calls, be sure the
  33.         display package cursor position and the screen position are
  34.         equal by doing a disp_flush() call.  disp_say(), disp_cls(),
  35.         and disp_char_at() all perform the disp_flush() call before
  36.         returning, thereby insuring cursor updating.
  37.  
  38.  
  39.         EXAMPLE
  40.  
  41.               int i;
  42.               disp_open();    /* initialize the package */
  43.               disp_cls();     /* clear the screen */
  44.               disp_say(0, 0, "Hello");  /* write to upper left corner */
  45.               for(i = 0; i < 10; i++) {
  46.                  disp_char_at(i, i+1, i | '0');  /* write a sequence */
  47.                  }
  48.               disp_move(12, 40);   /* move to center of screen */
  49.               disp_flush();        /* physically update screen cursor */
  50.               disp_sayr(20, 70, "Goodby");  /* write into lower corner */
  51.               disp_putc('!');   /* this char should be at 12, 40 */
  52.  
  53.  
  54.  
  55.         This function is found in SMDLx.LIB for the Datalight Compiler
  56.